package com.itheima.demo03;

public class StudentTest {
    public static void main(String[] args) {
        //空参构造
        //1. 创建学生类的对象.
        Student s1 = new Student();
        //2. 给属性赋值
        s1.setName("刘亦菲");
        s1.setAge(33);
        //3. 打印属性值
        System.out.println(s1.getName() + "..." + s1.getAge());
        //4. 调用成员方法
        s1.study();
        s1.eat();
        System.out.println("-------------------------");

        //全参构造
        //1. 创建对象
        Student s2 = new Student("赵丽颖", 31);
        //2. 打印属性.
        System.out.println(s2.getName() + "..." + s2.getAge());
        //3. 调用方法
        s2.study();
        s2.eat();

    }
}